<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .div1,.div2{
            width: 100px;
            height: 100px;
            margin: auto;
            background-color: skyblue;
        }
        *{
            background-color: #ffffff;
        }
        /* 属性选择器 */
        div[id]{
            background-color: yellow;
        }
        /* 具体属性选择器 */
        div[id='123']{
            background-color: green;
        }
        div div.div1{
            background-color: pink;
        }
        div div#122{
            background-color: orange;
        }
    </style>
</head>
<body>
    <div id="123">
        <div id="122">234</div>
        1123213
        <div class="div1">123</div>
        <div class="div2">456</div>
    </div>
</body>
</html>